1. Field of the Invention
The present invention relates generally to an improved data processing system, and in particular, to a computer implemented method, data processing system, and computer program product for efficiently using the disk space when unarchiving files in the same file system.
2. Description of the Related Art
In UNIX® servers, “tar” command is generally used for archiving and unarchiving files. Archiving comprises the process of combining a number of files into a single file, also known as an archive file. Unarchiving comprises the process of reconstructing the original files from the archive. To archive a number of specified data files within UNIX®, “tar” (for Tape Archive) command may be used to create an archive file from the set of data files. To unarchive an archive file, “tar” command is used, which extracts the individual files from the archive file. As “tar” has no built-in data compression abilities, “tar” is often used in tandem with an external compression utility, such as gzip or bzip2, to compress the single file to maximize archive space.
The process of unarchiving files currently requires that an amount of disk space equaling the size of the “tar” file be available. If both the “tar” file and the extracted files are required to be on the same file system, the tar file would extract the files one-by-one to the file system. However, the extraction would stop if there is not enough space on the file system for all of the extracted files. The “tar” file remains unchanged during the process of extraction because the file system is required to have free space equal to the “tar” file for successful extraction. This disk space size requirement can be problematic, since in many cases, a “tar” file may occupy a large amount of disk space, and the amount of space needed to perform the unarchiving is not always available. In these disk space situations, the system administrator must either increase the size of the file system to accommodate the unarchive process, or clear out unwanted files in the file system to make the needed space available.